using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShellAnywhere.Model
{
	using IParamToken = IToken<IParam>;
	using ParamToken = Token<IParam>;

	using IActionToken = IToken<IAction>;
	using ActionToken = Token<IAction>;

	using CharStream = Stream<char>;
	using ParamTokenStream = Stream<IToken<IParam>>;
	using ActionTokenStream = Stream<IToken<IAction>>;

	public interface IActionMgr
	{
		#region props
		bool IsActive { get; set; }
		string UserInput { get; set; }
		string CurrentDirectory { get; set; }
		int Dot { get; }

		bool HasActions { get; }
		IAction Current { get; }
		int Count { get; }
		string[] Targets { get; }
		#endregion props

		#region methods
		bool UserInputBackspace();

		int IncrIndex();
		int DecrIndex();
		int ResetIndex();

        void Init();
        void End();
        void Reset();
        void Update(string input);
        
        string Complete();	
		bool Advance();
		bool Withdraw();

        void Load(params string[] targetsAndDirectories);
		#endregion methods

		#region events
		event Action<string> CurrentDirectoryChanged;
		event Action<int, IAction[], int> ActionsChanged;
		#endregion events
	}
}
